
survey_resp = read.csv("./BKN survey/replication_file_apsr/data/survey_responses.csv",
                       colClasses = "character",
                       header = T)

survey_resp %<>%
  dplyr::select(RecordedDate, ROWNUM_ID = RecipientLastName, LocationLatitude, LocationLongitude, starts_with("Q")) %>%
  rename(q1_consent = Q1, q3_survey_gender = Q3, q5_survey_ethnic = Q5,
         q6_survey_apply_reason_1_chance = Q7_1, q6_survey_apply_reason_2_location = Q7_2, q6_survey_apply_reason_3_major = Q7_3,
         q7_survey_study_type = Q8, q8_survey_study_length = Q9, 
         q9_survey_success_pns = Q10, q_10_survey_accept_pns = Q11, q11_survey_turn_down = Q12, q12_survey_apply_again = Q13,
         q13_survey_success_reason_1_merit = Q53_1, q13_survey_success_reason_2_connection = Q53_2, q13_survey_success_reason_3_sara = Q53_3, 
         q14_survey_test_vs_connection = Q15, 
         q15_survey_test_java = Q17_1, q15_survey_test_muslim = Q17_2, q15_survey_test_girl = Q17_3,
         q16_survey_transparent = Q16,
         q17_survey_java1 = Q22_1, q17_survey_java2 = Q22_2, q17_survey_java3 = Q22_3, 
         q18_survey_daerah1 = Q23_1, q18_survey_daerah2 = Q23_2, q18_survey_daerah3 = Q23_3, 
         q19_survey_relg1 = Q24_1, q19_survey_relg2 = Q24_2, q19_survey_relg3 = Q24_3, 
         q20_survey_pancasila_h3 = Q21, q21_survey_nation_ethnic_h3 = Q59,
         q22_survey_working = Q24, q23_survey_look_work = Q33, q24_survey_length_unempl = Q34,
         q25_survey_job_text = Q34, q26_survey_income = Q35, q27_survey_job_satis = Q38) %>%

  slice(3:nrow(.)) %>%  #remove first two lines of junk
  filter(ROWNUM_ID != "") %>% #remove responses without unique identifier. These are mostly test answers I did in pre-testing.
  mutate(ROWNUM_ID = as.numeric(ROWNUM_ID))






